CompletionProviderT

Completion provider interface.

You must implement this interface to provide proposals to [class@Completion].

In most cases, implementations of this interface will want to use [vfunc@CompletionProvider.populate_async] to asynchronously populate the results to avoid blocking the main loop.

Members

Functions

activate
void activate(CompletionContext context, CompletionProposalIF proposal)

This function requests @proposal to be activated by the #GtkSourceCompletionProvider.

display
void display(CompletionContext context, CompletionProposalIF proposal, CompletionCell cell)

This function requests that the #GtkSourceCompletionProvider prepares @cell to display the contents of @proposal.

getCompletionProviderStruct
GtkSourceCompletionProvider* getCompletionProviderStruct(bool transferOwnership)

Get the main Gtk struct

getPriority
int getPriority(CompletionContext context)

This function should return the priority of @self in @context.

getTitle
string getTitle()

Gets the title of the completion provider, if any.

isTrigger
bool isTrigger(TextIter iter, dchar ch)

This function is used to determine of a character inserted into the text editor should cause a new completion request to be triggered.

keyActivates
bool keyActivates(CompletionContext context, CompletionProposalIF proposal, uint keyval, GdkModifierType state)

This function is used to determine if a key typed by the user should activate @proposal (resulting in committing the text to the editor).

listAlternates
PtrArray listAlternates(CompletionContext context, CompletionProposalIF proposal)

Providers should return a list of alternates to @proposal or %NULL if there are no alternates available.

populateAsync
void populateAsync(CompletionContext context, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously requests that the provider populates the completion results for @context.

populateFinish
ListModelIF populateFinish(AsyncResultIF result)

Completes an asynchronous operation to populate a completion provider.

refilter
void refilter(CompletionContext context, ListModelIF model)

This function can be used to filter results previously provided to the [class@CompletionContext] by the #GtkSourceCompletionProvider.

Meta